home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekikoh Dennoh Club 1
/
Gekikoh Dennoh Club Vol. 1 (Japan).7z
/
Gekikoh Dennoh Club Vol. 1 (Japan) (Track 1).bin
/
kowin
/
archive
/
apl
/
gview120.lzh
/
gviewsrc.lzh
/
loader.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-02-13
|
889b
|
52 lines
/*
Copyright 1995 Ogasawara Hiroyuki(COR.)
*/
#include <corlib.h>
#include <sys_doslib.h>
#include "gview.h"
typedef struct {
char *ext;
GVIEW *(*exec)();
} T_Loader;
extern GVIEW *GV_Load_Pi();
extern GVIEW *GV_Load_Pic();
extern GVIEW *GV_Load_Mag();
extern GVIEW *GV_Load_Hg();
extern GVIEW *GV_Load_Jpeg();
T_Loader l_table[]= {
{ ".pi", GV_Load_Pi },
{ ".pic", GV_Load_Pic },
{ ".mag", GV_Load_Mag },
{ ".hg", GV_Load_Hg },
{ ".jpg", GV_Load_Jpeg },
{ NULL, NULL },
};
GVIEW *
GV_LoaderExec( fname )
char *fname;
{
unsigned char *p= fname, *e= NULL;
for(; *p ; p++ ){
if( *p == '.' )
e= p;
}
if( e ){
T_Loader *tp= l_table;
for(; tp->ext ; tp++ ){
if( !strcmpi( tp->ext, e ) )
return (*tp->exec)( PathGetFullName(fname) );
}
}
GV_Err2( fname, "拡張子が判定できません" );
return NULL;
}